package com.crowntit.infrastructure.adapter.port;

import com.crowntit.domain.order.adapter.port.IPublisherPort;
import com.crowntit.infrastructure.event.EventPublisher;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class PublisherPort implements IPublisherPort {

    @Resource
    private EventPublisher publisher;

    @Override
    public void publish(String routingKey, String message) {
        publisher.publish(routingKey, message);
    }
}
